home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
vbkontrol.exe
/
VBDLL15D.ZIP
/
CLIENT.FR_
/
CLIENT.FR
Wrap
Text File
|
1995-03-03
|
6KB
|
212 lines
VERSION 2.00
Begin Form Form1
Caption = "Form1"
ClientHeight = 3648
ClientLeft = 852
ClientTop = 1548
ClientWidth = 5616
Height = 4176
Left = 816
LinkTopic = "Form1"
ScaleHeight = 3648
ScaleWidth = 5616
Top = 1056
Width = 5688
Begin CommandButton Command1
Caption = "Clear"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 6.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 300
Left = 528
TabIndex = 1
Top = 192
Width = 852
End
Begin ListBox List1
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 6.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 2520
Left = 288
TabIndex = 0
Top = 648
Width = 4860
End
Begin Menu mnuFile
Caption = "&File"
Begin Menu mnuFileExit
Caption = "E&xit"
End
End
Begin Menu mnuFunctions
Caption = "Fu&nctions"
Begin Menu mnuVBFunctionCall
Caption = "VBFunction&Call"
Begin Menu mnuTypeTest
Caption = "&TypeTest"
End
Begin Menu mnuShowForm
Caption = "&ShowForm"
End
End
Begin Menu mnuVBFunction
Caption = "&VBFunction"
Begin Menu mnustrrev
Caption = "&strrev"
End
Begin Menu mnuInStrRev
Caption = "&InStrRev"
End
Begin Menu mnuTypeTestStk
Caption = "&TypeTest"
End
Begin Menu mnuDecToHex
Caption = "&DecToHex"
End
Begin Menu mnuHexToDec
Caption = "&HexToDec"
End
End
End
End
Sub Command1_Click ()
List1.Clear
End Sub
Sub Form_Load ()
'flag if running under vb
Dim te As TASKENTRY
te.dwSize = Len(te)
bok% = TaskFindHandle(te, GetCurrentTask())
If bok% = False Then Exit Sub
If Left$(te.szModule, 3) = "VB" + Chr$(0) Then DesignEnv = True
End Sub
Sub Form_Unload (Cancel As Integer)
'unload server if under vb
If DesignEnv = True Then
bf% = True
ErrCode% = VBFunctionCall(ServerPath + "SERVER.MAK", "UnloadVbLib", 0, bf%)
End If
End Sub
Sub mnuDecToHex_Click ()
b10& = 65536 - 32 + 3 'FFE3
ErrCode% = DecToHex(b10&, ServerPath + "SERVER.MAK", "DecToHex", hx)
List1.AddItem "DecToHex: rc from call is " + hx
End Sub
Sub mnuFileExit_Click ()
Unload Me
End
End Sub
Sub mnuHexToDec_Click ()
hx$ = "f001"
ErrCode% = HexToDec(hx$, ServerPath + "SERVER.MAK", "HexToDec", dc)
List1.AddItem "HexToDec: rc from call is " + Str$(dc)
End Sub
Sub mnuInStrRev_Click ()
ErrCode% = InStrRev("aaaaa", "aaaa", ServerPath + "SERVER.MAK", "InStrRev", revpos%)
List1.AddItem "InStrRev: rc from call " + Trim$(Str$(cnt%)) + " is " + Trim$(Str$(ErrCode%))
List1.AddItem " Pos is " + Str$(revpos%)
End Sub
Sub mnuShowForm_Click ()
'Sample Calling Code for VB.
ErrCode% = VBFunctionCall(ServerPath + "SERVER.MAK", "ShowForm", 0, 0)
List1.AddItem "ShowForm: rc from call " + Trim$(Str$(cnt%)) + " is " + Trim$(Str$(ErrCode%))
End Sub
Sub mnustrrev_Click ()
revs$ = "0123456789"
ErrCode% = strrev(revs$, ServerPath + "SERVER.MAK", "strrev", 0)
List1.AddItem "strrev: rc from call " + Trim$(Str$(cnt%)) + " is " + Trim$(Str$(ErrCode%))
List1.AddItem " " + revs$
End Sub
Sub mnuTypeTest_Click ()
'Sample Calling Code for VB.
Dim TypeTestParm As TypeTestType
TypeTestParm.fnd = 1
TypeTestParm.lng = 20
TypeTestParm.sng = 300.3
TypeTestParm.rl = 4000.04
TypeTestParm.st = "string1"
TypeTestParm.fnd2 = 9000
TypeTestParm.lng2 = 800
TypeTestParm.sng2 = 80.8
TypeTestParm.rl2 = 70.07
TypeTestParm.st2 = "2string"
TypeTestParm.stlen = "0123456789"
TypeTestParm.DateToSt = Date
ErrCode% = VBFunctionCall(ServerPath + "SERVER.MAK", "TypeTest", Rtn$, TypeTestParm)
List1.AddItem "TypeTest$: rc from call " + Trim$(Str$(cnt%)) + " is " + Trim$(Str$(ErrCode%))
List1.AddItem " " + Str$(TypeTestParm.fnd)
List1.AddItem " " + Str$(TypeTestParm.lng)
List1.AddItem " " + Str$(TypeTestParm.sng)
List1.AddItem " " + Str$(TypeTestParm.rl)
List1.AddItem " " + TypeTestParm.st
List1.AddItem " " + Str$(TypeTestParm.fnd2)
List1.AddItem " " + Str$(TypeTestParm.lng2)
List1.AddItem " " + Str$(TypeTestParm.sng2)
List1.AddItem " " + Str$(TypeTestParm.rl2)
List1.AddItem " " + TypeTestParm.st2
List1.AddItem " " + TypeTestParm.stlen
List1.AddItem " " + Format$(TypeTestParm.StToDate, "General Date")
List1.AddItem " " + TypeTestParm.DateToSt
List1.AddItem " return " + Rtn$
End Sub
Sub mnuTypeTestStk_Click ()
'Sample Calling Code for VB.
stlen$ = "abcdefg"
ErrCode% = TypeTestStk(fnd%, lng&, sng!, rl#, st$, fnd2%, lng2&, sng2!, rl2#, st2$, StToDate, DateToSt, ServerPath + "SERVER.MAK", "TypeTestStk", Rtn$)
List1.AddItem "TypeTestStk: rc from call " + Trim$(Str$(cnt%)) + " is " + Trim$(Str$(ErrCode%))
List1.AddItem " " + Str$(fnd%)
List1.AddItem " " + Str$(lng&)
List1.AddItem " " + Str$(sng!)
List1.AddItem " " + Str$(rl#)
List1.AddItem " " + st$
List1.AddItem " " + Str$(fnd2%)
List1.AddItem " " + Str$(lng2&)
List1.AddItem " " + Str$(sng2!)
List1.AddItem " " + Str$(rl2#)
List1.AddItem " " + st2$
List1.AddItem " " + Format$(StToDate, "General Date")
List1.AddItem " " + DateToSt
List1.AddItem " return " + Rtn$
End Sub